<%@ page import="com.chinaoryx.TaskObject" %>
<%@ page import="java.util.List" %>
<%--
  Created by IntelliJ IDEA.
  User: hyman.zhang
  Date: 12-1-27
  Time:
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title></title>
</head>
<body>
       <table border="1">
           <tr>
               <th>taskId</th>
               <th>interval</th>
               <th>Status(future:isAlive/interrupted/state)</th>
               <th>taskId</th>
               <th>taskId</th>
           </tr>
           <%
               List<TaskObject>  list = (List<TaskObject>) request.getAttribute("taskList");
               for(TaskObject task: list) {
           %>
               <tr>
                   <td><%= task.getTaskId() %></td>
                   <td><%= task.getInterval() %></td>
                   <td><%= task.getStatus() %></td>
                   <td><a href="TaskManagerServlet?taskId=<%=task.getTaskId()%>&operate=start">Start</a></td>
                   <td><a href="TaskManagerServlet?taskId=<%=task.getTaskId()%>&operate=wait">Wait</a></td>
                   <td><a href="TaskManagerServlet?taskId=<%=task.getTaskId()%>&operate=notify">Notify</a></td>
                   <td><a href="TaskManagerServlet?taskId=<%=task.getTaskId()%>&operate=interrupt">Interrupt</a></td>
               </tr>
           <%
               }
           %>


       </table>
</body>
</html>